♻️ Refactor Focus Manager Event Handling for Enhanced User Experience ✨#2672
♻️ Refactor Focus Manager Event Handling for Enhanced User Experience ✨#2672sanjaiyan-dev wants to merge 13 commits intovercel:mainfrom
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 17d1760:
|
|
Like it, although there're some tests that we need to update. |
Ok, sure! But could you please guide me through it? I apologize for any inconvenience caused. |
|
Most of tests are based on |
Okay :) |
|
I apologize for the inconvenience, but I'm having trouble updating the test code correctly. I'm not familiar with the process, and I don't want to risk introducing errors or breaking anything. Could someone please lend me a hand and guide me through the correct steps? I'm sorry for any delays this may cause, and I truly appreciate your assistance. |
|
https://github.com/TanStack/query/pull/4805/files#diff-3cd8cae55f836a38ea976d6cbf9f1b59e8fdfa4d3218b123cb1f9dccfc6824d2 |
|
Changes look good to me but this might need to be landed in v3 as it's breaking. |
Okay 🙌 And thanks a lot @promer94 |
|
After this change has landed, we should change the example ( I feel |
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Secrets | View in Orca |
Any updates on how close is the v3? Can we have like future flags or a canary channel? |
As you can see, the focus manager currently listens to both
visibilitychangeandfocusevents by default.I believe it may be beneficial to consider discontinuing the listening to
focusevents and solely rely onvisibilitychangeevents.My rationale behind this proposal is that we might be supporting both events primarily for historical reasons. It is worth noting that
visibilitychangewas not fully supported in older browsers that are no longer relevant (e.g., IE11).The
focusevent has proven to have various pitfalls, as it can be triggered in the following scenarios:These scenarios have the potential to result in a suboptimal user experience.
This pull request is inspired by this reference PR.